from fastapi import FastAPI, Request
import uvicorn
# 创建FastAPI应用
app = FastAPI()

# 处理POST请求的端点
@app.post("/")
async def create_item(request: Request):
    return {
        "code": 200,
        "msg": "hello ngrok"
    }

# 主函数入口
if __name__ == '__main__':
    uvicorn.run(app, host='0.0.0.0', port=8080, workers=1)  # 在指定端口和主机上启动应用	
